<ion-view view-title="选择物流公司">
    <ion-nav-buttons side="left">
        <button class="button back-button buttons icon ion-ios-arrow-left button-clear header-item" nav-direction="back" ng-click="myGoBack()">返回</button>
    </ion-nav-buttons>
    <ion-nav-buttons side="right">
        <button class="button button-icon" ui-sref="moreCompany">更多</button>
    </ion-nav-buttons>
    <ion-tabs class="tabs-top tabs-stable tabs-color-positive">
        <ion-tab title="常用" class="tabs-item" on-select="selectTab()">
            <ion-view>
                <ion-content>
                    <ion-refresher
                            pulling-text="下拉刷新..."
                            on-refresh="doRefreshOften()">
                    </ion-refresher>
                    <div ng-if="showloading" style="margin-top:60px; text-align: center">
                        <ion-spinner icon="ios" style="height: 60px; width: 60px;"></ion-spinner>
                    </div>
                    <div ng-if="showloading == false" class="content">
                        <div class="bar bar-header item-input-inset">
                            <label class="item-input-wrapper">
                                <i class="icon ion-ios-search placeholder-icon"></i>
                                <input type="search" placeholder="搜索" ng-model="search.contentOften" ng-change="searchOften(search.contentOften)">
                            </label>
                        </div>
                        <h5 ng-if="oftenzdData==''" style="color: #69717d;text-align: center;margin-top: 50px;">未找到数据,快去推荐列表里添加吧</h5>
                        <ul class="list" ng-if="oftenzdData!=''">
                            <li class="item" on-hold="deleteCmp(oftenzd)" collection-repeat="oftenzd in oftenzdData" ng-click="chooseCompany(oftenzd)">
                                <div style="height: 30px;">
                                    <i  style="margin-left: 10px;font-size: 16px;">{{oftenzd.dwmc}}</i>
                                    <i ng-if="oftenzd.zddh!=''" class="ion-ios-telephone balanced"  style="font-size: 13px;margin-right: 10px;float: right;" ng-click="callPhone(oftenzd.zddh);$event.stopPropagation();">{{oftenzd.zddh}}</i>
                                </div>
                                <div>
                                    <i  style="margin-left: 10px;font-size: 13px;">{{oftenzd.zdmc}}</i><i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i>
                                    <i ng-if="oftenzd.xl!=''"  style="font-size: 13px;">{{oftenzd.xl}}</i>
                                    <i ng-if="oftenzd.xl==''"  style="font-size: 13px;">暂无其他线路</i>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <ion-infinite-scroll   on-infinite="loadMoreOften()"  distance="1%" ng-if="hasNextPageOften()"></ion-infinite-scroll>
                </ion-content>
            </ion-view>
        </ion-tab>
        <ion-tab title="推荐" class="tabs-item">
            <ion-view>
                <ion-content>
                    <ion-refresher
                            pulling-text="下拉刷新..."
                            on-refresh="doRefreshCity()">
                    </ion-refresher>
                    <div ng-if="showloading" style="margin-top:60px; text-align: center">
                        <ion-spinner icon="ios" style="height: 60px; width: 60px;"></ion-spinner>
                    </div>
                    <div ng-if="showloading == false" class="content">
                        <div class="bar bar-header item-input-inset">
                            <label class="item-input-wrapper">
                                <i class="icon ion-ios-search placeholder-icon"></i>
                                <input type="search" placeholder="搜索" ng-model="search.contentCity" ng-change="searchCity(search.contentCity)">
                            </label>
                        </div>
                        <h5 ng-if="cityzdData==''" style="color: #69717d;text-align: center;margin-top: 50px;">未找到数据</h5>
                        <ul class="list" ng-if="cityzdData!=''">
                            <li class="item" collection-repeat="cityzd in cityzdData" ng-click="chooseCompany(cityzd)">
                                <div style="height: 30px;">
                                    <i  style="margin-left: 10px;font-size: 16px;">{{cityzd.dwmc}}</i>
                                    <i class="ion-plus-round" ng-click="addCompany(cityzd,1);$event.stopPropagation();" style="font-size: 13px;float: right;width: 30px;height: 50px;"></i>
                                    <i ng-if="cityzd.zddh!=''" class="ion-ios-telephone balanced" ng-click="callPhone(cityzd.zddh);$event.stopPropagation();" style="font-size: 13px;float: right;margin-right: 20px;">{{cityzd.zddh}}</i>
                                </div>
                                <div>
                                    <i  style="margin-left: 10px;font-size: 13px;">{{cityzd.zdmc}}</i><i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i>
                                    <i ng-if="cityzd.xl!=''"  style="font-size: 13px;">{{cityzd.xl}}</i>
                                    <i ng-if="cityzd.xl==''"  style="font-size: 13px;">暂无其他线路</i>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <ion-infinite-scroll   on-infinite="loadMoreCity()"  distance="1%" ng-if="hasNextPageCity()"></ion-infinite-scroll>
                </ion-content>
            </ion-view>
        </ion-tab>
        <!--ng-if="oftenzdData==''&&lszdData!=''"-->
        <ion-tab title="历史发货站点" class="tabs-item">
            <ion-view>
                <ion-content>
                    <ion-refresher
                            pulling-text="下拉刷新..."
                            on-refresh="doRefreshLs()">
                    </ion-refresher>
                    <div ng-if="showloading" style="margin-top:60px; text-align: center">
                        <ion-spinner icon="ios" style="height: 60px; width: 60px;"></ion-spinner>
                    </div>
                    <div ng-if="showloading == false" class="content">
                        <div class="bar bar-header item-input-inset">
                            <label class="item-input-wrapper">
                                <i class="icon ion-ios-search placeholder-icon"></i>
                                <input type="search" placeholder="搜索" ng-model="search.contentLs" ng-change="searchLs(search.contentLs)">
                            </label>
                        </div>
                        <h5 ng-if="lszdData==''" style="color: #69717d;text-align: center;margin-top: 50px;">暂无历史数据</h5>
                        <ul class="list" ng-if="lszdData!=''">
                            <li class="item" collection-repeat="lszd in lszdData" ng-click="chooseCompany(lszd)">
                                <div style="height: 30px;">
                                    <i  style="margin-left: 10px;font-size: 16px;">{{lszd.dwmc}}</i>
                                    <i class="ion-plus-round" ng-if="lszd.bs==0" ng-click="addCompany(lszd,2);$event.stopPropagation();" style="font-size: 13px;float: right;width: 30px;height: 50px;"></i>
                                    <i ng-if="lszd.zddh!=''" class="ion-ios-telephone balanced" ng-click="callPhone(lszd.zddh);$event.stopPropagation();" style="font-size: 13px;float: right;margin-right: 20px;">{{lszd.zddh}}</i>
                                </div>
                                <div>
                                    <i  style="margin-left: 10px;font-size: 13px;">{{lszd.zdmc}}</i><i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i>
                                    <i ng-if="lszd.xl!=''"  style="font-size: 13px;">{{lszd.xl}}</i>
                                    <i ng-if="lszd.xl==''"  style="font-size: 13px;">暂无其他线路</i>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <ion-infinite-scroll   on-infinite="loadMoreLs()"  distance="1%" ng-if="hasNextPageLs()"></ion-infinite-scroll>
                </ion-content>
            </ion-view>
        </ion-tab>
    </ion-tabs>
</ion-view>